<template>
  <el-container>
    <el-aside width="200px">
      <el-menu
        :default-active="$route.path"
        class="el-menu-vertical-demo"
        @open="handleOpen"
        @close="handleClose"
        background-color="#545c64"
        text-color="#fff"
        active-text-color="#ffd04b"
        router
      >
        <el-menu-item index="/">
          <i class="el-icon-menu"></i>
          <span slot="title">仪表盘</span>
        </el-menu-item>
        <el-submenu index="1">
          <template slot="title">
            <i class="el-icon-location"></i>
            <span>知识库</span>
          </template>
          <el-menu-item-group>
            <el-menu-item index="/msbd/classify">分类管理</el-menu-item>
            <el-menu-item index="/msbd">面试宝典</el-menu-item>
          </el-menu-item-group>
        </el-submenu>
        <el-menu-item index="/users">
          <i class="el-icon-menu"></i>
          <span slot="title">用户管理</span>
        </el-menu-item>
        <el-submenu index="/test">
          <template slot="title">
            <i class="el-icon-location"></i>
            <span>在线测试</span>
          </template>
          <el-menu-item-group>
            <el-menu-item index="/text">在线考试</el-menu-item>
            <el-menu-item index="/text/questions">试题管理</el-menu-item>
          </el-menu-item-group>
        </el-submenu>
        <!-- <el-menu-item index="/text">
          <i class="el-icon-setting"></i>
          <span slot="title">在线考试</span>
        </el-menu-item>-->
        <!-- <el-menu-item index="/msbd">
          <i class="el-icon-setting"></i>
          <span slot="title">面试宝典</span>
        </el-menu-item>-->
      </el-menu>
      <!--  -->
    </el-aside>
    <el-container>
      <el-header>
        <div>管理系统</div>
        <div>
          <el-dropdown trigger="click" @command="handleCommand">
            <span class="el-dropdown-link">
              用户：{{userInfo.name}}（{{userInfo.roles}}）
              <i class="el-icon-arrow-down el-icon--right"></i>
            </span>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item>个人中心</el-dropdown-item>
              <el-dropdown-item command="logout">安全退出</el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
        </div>
      </el-header>
      <el-main>
        <nuxt />
      </el-main>
      <el-footer>Footer</el-footer>
    </el-container>
  </el-container>
</template>

<script>
export default {
  data() {
    return {
    };
  },
  methods: {
   
  },
  
};
</script>

<style>
html,
body,
#__nuxt,
#__layout {
  height: 100%;
}
body {
  margin: 0;
}
</style>

<style scoped>
.el-header {
  line-height: 60px;
}

.el-header,
.el-footer {
  background-color: #b3c0d1;
}

.el-aside {
  background-color: #d3dce6;
}

.el-main {
  background-color: #e9eef3;
}

body > .el-container {
  margin-bottom: 40px;
}

.el-container {
  height: 100%;
}

.el-menu {
  border-right: none;
}

.el-aside {
  background: #545c64;
}

.el-header {
  display: flex;
  justify-content: space-between;
}

/* .el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
} */
</style>